package x.y.z.mapper;

import org.apache.ibatis.annotations.*;
import x.y.z.model.DictType;

import java.util.List;
@Mapper
public interface DictTypeMapper {
    @Select("select * from sys_dict_type t ")
    @Results({
            @Result(id = true,property = "id",column = "dict_id"),
            @Result(property = "name",column = "dict_name"),
            @Result(property = "type",column = "dict_type"),
            @Result(property = "status",column = "status"),
            @Result(property = "createBy",column = "create_by"),
            @Result(property = "createTime",column = "create_time"),
            @Result(property = "updateBy",column = "update_by"),
            @Result(property = "updateTime",column = "update_time"),
            @Result(property = "remark",column = "remark")

    })
    List<DictType> getAll();
    @Select("select * from sys_dict_type t where t.dict_id = #{id}")
    @Results({
            @Result(id = true,property = "id",column = "dict_id"),
            @Result(property = "name",column = "dict_name"),
            @Result(property = "type",column = "dict_type"),
            @Result(property = "status",column = "status"),
            @Result(property = "createBy",column = "create_by"),
            @Result(property = "createTime",column = "create_time"),
            @Result(property = "updateBy",column = "update_by"),
            @Result(property = "updateTime",column = "update_time"),
            @Result(property = "remark",column = "remark")

    })
    DictType getById(@Param("id") Long id);

}
